<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
	<jsp:include page="/WEB-INF/jsp_lib/validate.jsp" />
	<jsp:include page="/WEB-INF/jsp_lib/my97.jsp"/>
	<script type="text/javascript">
		$(function(){
			$("#form1").validate({
				rules :{
					'end_user_id' : {
						required :true
					},
					'time_get' : {
						required :true
					},
					'time_back' : {
						required :true
					}
				}
			});
		});
		
		function add(){
			$("#form1").submit();
		}
	</script>
</head>
<body>
<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<div>
		<form action="${path}/ix/seal/auth/add.htm" id="form1" method="post">
			<h2>
				<div>
					添加转授权
				</div>
			</h2>
			<table width="100%" class="lindex">
				<tr>
					<th align="right">
						授权用户：
					</th>
					<td align="left" colspan="2">
						<input value="${user.name}(${user.uname})" type="text" maxlength="50" readOnly/>
						<input type="hidden" name="begin_user_id" value="${user._id}" maxlength="50"/>
					</td>
					<th align="right">
						被授权用户：
					</th>
					<td align="left" colspan="2">
						<select name="end_user_id">
							<c:forEach items="${userlist}" var="v">
								<c:if test="${v._id!=user._id}">
								<option value="${v._id}">${v.uname}</option>
								</c:if>
							</c:forEach>
						</select>
					</td>
				</tr>
				
				<tr>
					<th align="right">
						生效方式：
					</th>
					<td align="left" colspan="2">
						<input name="type" type="radio" value="定时启用"  checked />定时启用&nbsp;
						<input name="type" type="radio" value="即时启用" />即时启用
					</td>
					<th align="right">
						授权时间：
					</th>
					<td align="left" colspan="2">
						<input type="text" name="time_get" maxlength="30" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"  readonly="readonly" />
						<input type="text" name="time_back" maxlength="30" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"  readonly="readonly"  />
					</td>
				</tr>
				
			</table>
			<div class="options">
			 	<a href="javascript:add();" class="asave"> 【保存】 </a>
				<a href="javascript:goBack();" class="asave"> 【返回】 </a>
				</div>
		</form>	
	</div>
</body>
</html>